UK Transport Wiki:ROUTE
:Other such lists need to be integrated into that catalog. Route diagram templates simplify the writing of Wiki tables and provide a uniform layout primarily to railway route-map infoboxes for railway lines, waterways and other modes of transport. A grid of square icons is used to draw a route diagram, and there are over 3000 icons to identify features including railway track , railway stations , bridges , rivers , tunnels , junctions and interchanges . Structure of the map table The right image shows the generic structure of the map table constructed by the templates of this project. The format is not compulsory, but some of the syntax does require careful "programming", so that it will not mess up the layout of the article which transcludes the map. The following sections will explain the function and usage of the templates. Templates The templates may be considered to be in two classes: :General templates defining the product as a route map, :Detailing templates carrying information row by row into the route map. Master table margin style-defining templates |} |} The opening of a "stand-alone" map (i.e. without transcluded into other template such as infobox.) They do not call for the table themselves, so follow the command Table title template |} defines the text title of the table; use it right below the railway line header. They are not necessary especially when included in the infobox. But editor has the option to set the colors for both title background and font, thus indicate the livery color of the line. Railway company information template The optional provision of the details of a railway company. Preferably used between the and . Map table templates These templates define the suitable styling for the route map. They are the must for joining the row templates seamlessly. They have already included the Wiki table opening syntax ' ' after the map is complete. Choose either 1 table template to continue: Both table templates have 2 unnamed parameters. The first determines which type of legend page to be linked to (displayed at the upper-right corner of the map): * route or 1''' (default): , the most generic legend for railway map. * '''track: for railway track and platform alignment diagram. * bus: for any type of bus route map. * canal, water or waterway: for waterway or canal map. * walkway, foot or footpath: User:David Edgar/Footpath legend for footpath map. (Tentative) * no or 0''': No legend page link. The second one allows additional CSS styling to be defined for the table and shouldn't be used easily. Icon and text row templates |} The real meat of designing the map. The number (#) after the template name '''BS (German abbreviation of B'ahn's'trecke for ''stretch of track) indicate how many horizontal icon grids available. Use these templates with icon images continuously on every new row to construct the map. BS(#) row templates The unnamed (sequential) parameters of are as follow. The order of these parameters are lined up just as how the output will look like: :1: [[#Pictograms|'''Icon ID]] for what icon will be displayed in the icon column. (For no icon to be shown leave blank or use "leer" for "empty"). :2: Distance along track or traveling time from the starting point. :3: Text, name of station or other feature. :4: Note 1 - Written after Text with a leading space in smaller characters. :5: Note 2 - Written after Note 1 in the smaller characters but right-aligned. (This case can be used as another Dist./Time case). BS row templates with a number shift the unnamed parameter order of text column to make way for extra icon grids sequentially: etc. Named parameters All BS row templates have named (designated) parameters, providing advanced functions. Remember to distinguish between the uppercase and lowercase alphabets of the parameter name. : PX: Width of icon (e.g. PX=50px), 20px by default. :: PX2, PX3, etc.: further definition of the width of the corresponding icon case. The parameter PX works as the global width or the individual width for the 1st icon. ::: Beware that PX parameters have no effect on the icons of other rows. : O1 (Owe one not zero one), O12 - O15: ID of an icon to overlay on the lower icon of the same grid, 5 layers in total. The greater number of the parameter indicates the upper layer which is over the smaller. :: O2, O22 - O25: ID of an icon to overlay on the icon of the 2nd icon grid. :: O3, O32 - O35: ID of an icon to overlay on the icon of the 3rd icon grid, etc. : alt1, alt2, alt3, etc.: User-defined alt attribute for the icon image to override the alt text generated by . See also Wikipedia:Alternative text for images. : L1, L2, L3, etc.: User-defined internal link for the icon image to override the default link to file description page of the icon. : bg: Use color name or HTML RGB hex code (with prefix #) to "highlight", to emphasize certain sections, transparent by default : tw: Width of the text column. This is especially required for joining the icons cohesively when the text length in the "normal" BS row template text column isn't wide enough to override the BS row collapsible sections. |} Lining up BS row templates }}} }} |- |colspan=8 style="border-top:1px solid black"|Example 2 |- }} }} |- |colspan=8 style="border-top:1px solid black"|Example 3 |- }} }} |- |colspan=8 style="border-top:1px solid black"|Example 4 |- }} }} }} }} |} |} |} Except for , all BS# row templates will join the icons in the same row cohesively, unless separated by an empty or leer entry. To join the icons vertically, just open the same new BS row template and continue. (Example 1) Editor can also line up different BS(#) row templates, because their icon column is set to align to center. This is usually done by joining odd number row template by odd number row template, even number row template by even number row template, in order to omit the need of empty entry to stack up grid space. In exmaple 2 and 3, the only icon of joins the 2nd icon of vertically; and the 2nd and 3rd icons of join the 1st and 2nd icons of respectively. When joining odd and even number row templates (example 4), specialized icons such as BS2l and BS2c3 (supplementary corner) are required to patch the seam smoothly, see branching icons catalog. Fractional text display template is a template primarily designed for Dist./Time and Note 2 cases in the BS(#) row template when 2 distances must be shown together vertically in fractional format, for example when a new range of distances starts. Usage: . Despite its name, this template does not output the unit km after the text entry. Applying this template in Text and Note 1 cases will lengthen the height of row, thus causing the icons not joining cohesively row to row. If this is still desired, use parameter PX to enlarge the icon size (greater than default width, 20px) on all rows to overtop the height of . Closing map table Use |}s to close the map table. The exact amount required to close is judged by at least 3 points. 1st for any collapsible section. 2nd for the . 3rd for the call of table before the , s of BS-table. Example }|}} |} |- |Times shown are fastest timetabled journey from London St Pancras. |} Note: The code here produces the adjoining map. It does not mean to reflect the current situation. }|}} |} |- |Times shown are fastest timetabled journey from London St Pancras. |} |} |} BS(#)-2 row templates BS(#)-2 templates take text on both sides without the Distance/Time case available as oppose to the previously introduced BS(#) row templates that only allow text to be displayed to the right-hand side of the icon column. All named parameters of BS(#) row templates are applicable here. These templates should not be used with other "right-Text only" BS(#) row templates. Example is shown in the demonstration on the top of this project page. Unnamed parameters are as follow: etc. * startCollapsible templates are not yet available for BS"#"-2 map. Hints } |} |- |} |} * If a station has a WP article, link to that, not to the town. * Avoid overlinkage to a city or railway when its occurrences are close together on the route map. * For a line which connects to the subject line link its article particularly if there is a connection for passengers. * For vee stations show the lines as already joined in the station to show the connection or use the CPIC set. The mere showing of a vee station shows that it has not been overlooked. * At the ends of a line show tracks which go further by STR or CONT set . * For lines branching off as the route runs from its start specify 'To X', in the opposite case (lines which join) 'From X'". ** Template (shortcut: ) is an option to help describing in the text column with arrow icons ) . * When your map grows too big like ''this'', it is recommended not to transclude such map inside an infobox or table which floats / aligns to left or right, otherwise it would press the main text outside to the narrow space. This problem exaggerates to user who uses small screen resolution. It is a good idea to use the standalone table with style defined by or so the table does not float to left or right. If the left/right-aligned table is desired, adjust the map width for a minimum of 1024px display width in monobook Wiki style. Set the table collapsed by default also helps (by applying the parameter collapse=yes in or ). * If an unusual situation requires using a current icon unconventionally, give an explanation either by the text level with the icon or by a note at the top or bottom of the map, separated by an empty row or border line, showing the "misused" icon and its meaning. Pictograms A list of the pictograms which are currently available. A separate page lists waterways pictograms. A directory of icons can be found at Wikimedia Commons. The conventional file name format for image of this project is as follow: BSicon_(pictogram ID).svg. In BS(#) row templates, editor only needs to type the ID for the desired icon. The name of a pictogram, or ID, is constructed by prefix, ROOT and suffix jointly (e.g. forming by u-STR-lg). Prefix and suffix are always lowercase but ROOT is all caps to distinguish from the affixes. All icons contain at least 1 ROOT or combining 2 or more to form some complex icon. Affixes mostly variate the "base" icon in color, directionality, structure, etc and may not apply to simple icons. Because of the number of projects using these icons, additional codes have been created for special uses, including parallel routes and type changes. A complete index is available at User:AlisonW/Rail Icons for CSS-compatible browsers. The following tables of icon cover the most basic, commonly used stems: Prefix It indicates that infrastructure is not used, disused (or not yet opened), and whether it runs in a tunnel or elevated: * Alternatives are not recommended because they cause inconsistency with other prefixes and to the naming rule. Editor may use these icons if the desired icon of the formal prefix does not exist. Root The core part of the icon ID: * These icons are accompanied with suffix in most case. Number indicates the variation is also considered suffix in this case. * Alphabet Ü''' (DE: ue) can be input using ASCII by alt+0220 (must type the number on numeric keypad on the righthand side of keyboard). Some non-western language option might alter to the undesired output such as the lowercase '''ü or non-diacritic U'''. Some redirects replacing the 'Ü' with 'UE' are already set up (e.g. BRUECKE -> BRÜCKE). You may creat such file name redirect in Wikimedia Commons yourself if you see fit. Suffix Affixes in this category indicates the directionality, position or structural variation. Note that directions assume a vertically downward route. * The directionality for-, back-, left- and right-ward of ROUTE icon is based on that the line in the map starts the trip from the upper side '''downward. So the left and right are reversed in the map from objective view, unless the direction is described as backward. Some icon makes exception, such as CPIC and corner sets. Overlay If a required icon does not exist it might be produced from 2 to 6 existing icons using the overlay parameter to superimpose one icon over another. Add the overlay parameter in the BS(#) row template, O1 corresponds to icon grid 1, O2 icon grid 2, etc.; O1, O2, O3 represents the 1st layer and O12, O22, O32 directs to the 2nd layer, etc., 5 overlapping layers in total. The icon of greater-number-overlay parameter will appear over the icon of the smaller-number-overlay parameter and the base icon. |} * In order to allow the other editors to access the code of the map easier, it is a good practice to line up the overlay parameters right beside the corresponding "base" icon entry. That way we humans do not need to look at the codes back and forth. The following examples A and B give the same result, but example B is recommended for the editors: |} :A: :B: * For unknown reason, in Microsoft Internet Explorer 7 or other browsers based on IE7, overlaid icons might shift horizontally to an unintended position (or simply be invisible.) This will happen when changing the browser size or show/hide any collapsible section that will change the BS table position or its width. This can be cured temporarily after purging the page. Also hide the collapsible map and then show it again has the same effect, but there are several benefits to purge the page. HUB HUB is a set of modules which requires overlaying to describe multiple lines within a large transport hub, usually sharing one station name. The naming rule of these icons is different from ordinary railway icons. |} Developer notes Own icons In most case the icons available in Wikimedia Commons should be sufficient. However, if you think you need to create an icon of your own, please take note of the following points: * Check on Commons Icons for railway descriptions and subcategories whether a such icon already exists. * Think if the icon you need can be done via overlaying 2 to 6 existing icons. * Use SVG file format only. This can be done by using CORELDraw, Inkscape, Adobe Illustrator or an html/xml (text) editor. * Follow the colour scheme and naming conventions listed in the catalog of pictograms and User:AlisonW/Rail_Icons. :* Names should be of the form: "BSicon prefixROOTsuffix.svg" :* where ROOT defines a general function/shape, :* prefix specifies a coloration/style/usage, and :* suffix is a shape modifier :* redirects must be made for files containing diacritics from their dediacriticized name on Commons. For example [[:file:BSicon BRUECKE.svg|file:BSicon BR'UE'CKE.svg]] redirects to [[:file:BSicon BRÜCKE.svg|file:BSicon BR'Ü'''CKE.svg]]. * Graphic size isn't restricted, but it should be in square shape, usually 500px by 500px. They will be eventually resized to 20px-high in the map by default. * Tompw's Icon Generator may be used to easily create some types of new SVG icons. * Upload files to Wikimedia Commons, add proper copyright statement and the Category:BSicon . * Do not use copyrighted materials such as company logo. Even if you do not upload to Commons, it will violate the terms of fair use when applying them in the map. * If you are incapable or having trouble in creating icon, post your question in the talk page. Colour scheme :*Existing lines in current use :: :: :*Lines not in current use (planned or closed) :: :: :*Other features :: :: :: :: :: :: :: :: :: Test circuit '''Not implemented on en: yet' There is a test circuit on German Wikipedia: w:de:Wikipedia Diskussion:Formatvorlage Bahnstrecke/BS Test, where new icons can be safely tested. Please use the template KBSv instead of BS there Sandbox area Experimental design can be produced in Wikipedia:Railway line template/sandbox See also *Canal/Water icons: **Category:Icons for canal descriptions (on Commons) ** *FootPath icons: **Category:Icons for footpath descriptions (on Commons) **Talk:Long-distance footpaths in the UK#Footpath Icons *Motorway icons: **Category:Icons_for_motorway_descriptions/Detailed (on Commons) **Category:Icons_for_motorway_descriptions/Simple (on Commons) *Rail icons: **Category:Icons_for_railway_descriptions (on Commons) **Rail_Icons - CSS table depicting possible and implemented *Optional instrumental template: ** : help transcluding route map into infobox that doesn't support RDT well ** : description for route template Category:Rail routemap templates be-x-old:Вікіпэдыя:Шаблёны маршрутаў ca:Viquipèdia:Plantilles d'esquemes de ferrocarril cs:Wikipedie:Infobox železniční trať de:Wikipedia:Formatvorlage Bahnstrecke eo:Vikipedio:Ŝablonoj fervojaj es:Wikipedia:Línea ferrocarril fr:Wikipédia:Modèles/BS hsb:Wikipedija:Předłoha železniska linka hu:Wikipédia:Útvonaldiagram it:Utente:Jollyroger/mappafer/istruzioni ja:Wikipedia:経路図テンプレート nl:Wikipedia:Spoorlijnsjablonen pl:Wikiprojekt:Linie kolejowe pt:Wikipedia:Predefinição de diagramas de estradas e caminhos-de-ferro ru:Википедия:Маршрутные шаблоны sv:Wikipedia:Projekt linjekarta zh:Wikipedia:铁路系统标示